package com.discovery.common.ret;

import lombok.Getter;

/**
 * 返回对象实体
 */
@Getter
public class RetResult<T> {
    public int code;//状态码

    private String msg;//提示信息

    private T data;//返回的具体数据

    public RetResult<T> setCode(RetCode code){
        this.code = code.getCode();
        return this;
    }

    public RetResult<T> setMsg(String msg){
        this.msg = msg;
        return this;
    }

    public RetResult<T> setData(T data){
        this.data = data;
        return this;
    }
}
